# -*- codeing = utf-8 -*-
# @Time : 2021/2/28 16:55
# @Atuthor: 朱朱
# @File: module.py.py
# @Software: PyCharm
import hashlib

def encrypt_password(pwd):
    sha = hashlib.sha256()
    # print(sha)
    sha.update(pwd.encode('utf8')) # 必须进行编码,要不然报错
    # print(type(sha.digest()))
    return sha.hexdigest() # 返回字符串

# x = encrypt_password('123456')
# print(x)
